class StringUtils {


    /**
     * 判断是否为空
     *
     * @author 徐寿春
     * 2023/4/4 13:40
     */
    isEmpty(word: string) {
        if (word == null) {
            return true;
        }

        return word.replace(/(^s*)|(s*$)/g, "").length == 0
    }

    /**
     * 判断是否不为空
     *
     * @author 徐寿春
     * 2023/4/4 13:40
     */
    isNotEmpty(word: string | void | undefined) {
        if (word == null) {
            return false;
        }

        if (word){
            return word.replace(/(^s*)|(s*$)/g, "").length > 0
        }
        return false

    }


}

let stringUtils = new StringUtils();
export default stringUtils